package com.hkfrich.generator.service;


import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hkfrich.generator.domain.GenTable;

import java.util.List;
import java.util.Map;

/**
 * @ClassName GenTableService
 * @Desscription
 * @Author _HeiShuai
 * @Date 2022/8/27 10:20
 * @Version 1.0
 **/
public interface GenTableService extends IService<GenTable>{
    Page<GenTable> selectDbTableList(Page<GenTable> page, GenTable genTable);

    List<GenTable> selectDbTableListByNames(String[] tableNames);

    void importGenTable(List<GenTable> tableList);

    byte[] createGenTableFile(String[] tableNames);

    boolean removeOneGenTableAndGenTableColumns(List<Long> list);

    Map<String, String> previewCode(Long id);

    GenTable selectGenTableById(Long id);
    /**
     * 查询所有表信息
     *
     * @return 表信息集合
     */
    public List<GenTable> selectGenTableAll();

    void validateEdit(GenTable genTable, JSONObject paramsObj);

    void updateGenTable(GenTable genTable, JSONObject paramsObj);

    void synchDb(String tableName);
}
